In [1]:
%pylab inline
import phreeqpython
pp = phreeqpython.PhreeqPython('phreeqc.dat')
In [2]:
x = []
y = []
for ph in np.linspace(3,12, 17):
sol = pp.add_solution({'pH': ph, 'Al': '1e3 Gibbsite'})
x.append(ph)
y.append(sol.total_element('Al', units='mol'))
In [3]:
plt.figure(figsize=[10,5])
plt.plot(x, y, 'rs-')
plt.title('Gibbsite Equilibrium')
plt.xlim(0,14)
plt.yscale('log')
plt.grid()
In [ ]: